<div class="dp100">
	<h2 class="sepH_b">Thống kê loại hình điều trị - <?php echo $c_city["City"]["name"] ?> - quý <?php echo $c_quarter ?>/<?php echo $c_year ?></h2>
	
	<h3>Điều trị nội trú</h3>
	
<?php if($notEmpty["in"]) { ?>
	
	
	<table cellspacing="0" cellpadding="0" border="0" class="table_a formEl_a smpl_tbl">
		<thead>
			<tr>
				<th width="20%" align="center">Loại hình</th>				
				<th align="center">Tổng số</th>
				<th align="center">Ghi chú</th>
				
				
			</tr>
		</thead>
		<tbody>
			<?php foreach($treatments_in as $e => $treatment) { ?>
				<tr>
					<td align="left" class="chb_col" style="font-weight:bold;text-align: left"><?php echo $treatment["Treatment"]["name"] ?></td>
					<td align="right">
						<?php if($values_in['total'][$treatment["Treatment"]["id"]] != "") echo number_format($values_in['total'][$treatment["Treatment"]["id"]],0,".", ","); else echo "0"; ?>							
					</td>
					<td align="left">
						<?php echo $values_in['note'][$treatment["Treatment"]["id"]] ?>
					</td>				
				</tr>
			<?php } ?>			
		</tbody>
	</table>
	<!--<div style="text-align: right">(Đơn vị: thiết bị)</div>-->
	
	
<?php } else { ?>

	 <p>Hiện Tỉnh/Thành <?php echo $c_city["City"]["name"] ?> chưa có dữ liệu nhập quý <?php echo $c_quarter ?>/<?php echo $c_year ?>.</p><br /><br />

<?php } ?>
	
	
	
		
	<h3>Điều trị ngoại trú</h3>
	
<?php if($notEmpty["out"]) { ?>

	<table cellspacing="0" cellpadding="0" border="0" class="table_a formEl_a smpl_tbl">
		<thead>
			<tr>
				<th width="<?php echo 100/(count($branches)+1) ?>%" align="center">Loại hình</th>			
				
				<?php foreach($branches as $b => $branch) { ?>
					<th width="<?php echo 100/(count($branches)+2) ?>%" align="center"><?php echo $branch["Branch"]["name"] ?></th>
				<?php } ?>
				
				<th align="center">Tổng cộng</th>
				
				
			</tr>
		</thead>
		<tbody>
			<?php foreach($treatments as $e => $treatment) { ?>
				<tr>
					<td align="left" class="chb_col" style="font-weight:bold;text-align: left"><?php echo $treatment["Treatment"]["name"] ?></td>
					<?php foreach($branches as $b => $branch) { ?>
						<td align="right">
							<?php if($values[$branch["Branch"]["id"]][$treatment["Treatment"]["id"]] != "") echo number_format($values[$branch["Branch"]["id"]][$treatment["Treatment"]["id"]],0,".", ","); else echo "0"; ?>
							
						</td>
					<?php } ?>
					<td align='right'>
						<strong><?php if($treatment["total"] != "") echo number_format($treatment["total"],0,".", ","); else echo "0"; ?></strong>
					</td>
				</tr>
			<?php } ?>			
		</tbody>
	</table>
	<!--<div style="text-align: right">(Đơn vị: thiết bị)</div>-->
	
<?php } else { ?>

	 <p>Hiện Tỉnh/Thành <?php echo $c_city["City"]["name"] ?> chưa có dữ liệu nhập quý <?php echo $c_quarter ?>/<?php echo $c_year ?>.</p>

<?php } ?>
	
</div>
	
	